import request from "@/utils/request";

// 查询批次管理列表
export function listPatch(query) {
  return request({
    url: "/seedlingSys/patch/list",
    method: "get",
    params: query,
  });
}

// 查询批次管理详细
export function getPatch(patchID) {
  return request({
    url: "/seedlingSys/patch/" + patchID,
    method: "get",
  });
}

// 新增批次管理
export function addPatch(data) {
  return request({
    url: "/seedlingSys/patch",
    method: "post",
    data: data,
  });
}

// 修改批次管理
export function updatePatch(data) {
  return request({
    url: "/seedlingSys/patch",
    method: "put",
    data: data,
  });
}

// 删除批次管理
export function delPatch(patchID) {
  return request({
    url: "/seedlingSys/patch/" + patchID,
    method: "delete",
  });
}

// 查询种苗列表
export function listZhongmiao(query) {
  return request({
    url: "/seedlingSys/zhongmiao/list",
    method: "get",
    params: query,
  });
}

// 查询栽培列表
export function listZaipei(query) {
  return request({
    url: "/seedlingSys/zaipei/list",
    method: "get",
    params: query,
  });
}

// 通过二维码获取批次信息
export function getPatchByQrCode(code) {
  return request({
    url: "/seedlingSys/patch/getPatchByQrCode/" + code,
    method: "get",
  });
}
